package com.ylp.lianxi.myAdapter;

/**
 * 适配器模式
 * @author Administrator
 *
 */
public class ZMainTest {

	public static void main(String[] args) {
		
		//使用组合模式；
		GBTwoPlugIf two = new GBTwoPlugIf();
		ThreePlugIf three = new TwoToThreeAdapter(two);
		NoteBook notebook = new NoteBook(three);
		notebook.charge();
		System.out.println();
		
		//使用继承模式
		three = new TwoToThreeAdapterExtends();
		notebook = new NoteBook(three);
		notebook.charge();
		System.out.println();
	}
}
